<?php
/* @var $this ContentsController */
/* @var $model Contents */
/* @var $form CActiveForm */
?>

<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'contents-form',
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'title'); ?>
		<?php echo $form->textField($model,'title',array('size'=>60,'maxlength'=>200)); ?>
		<?php echo $form->error($model,'title'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'slug'); ?>
		<?php echo $form->textField($model,'slug',array('size'=>60,'maxlength'=>200)); ?>
		<?php echo $form->error($model,'slug'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'text'); ?>
		<?php echo $form->textArea($model,'text',array('rows'=>6, 'cols'=>50)); ?>
		<?php echo $form->error($model,'text'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'order'); ?>
		<?php echo $form->textField($model,'order',array('size'=>10,'maxlength'=>10)); ?>
		<?php echo $form->error($model,'order'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'status'); ?>
		<?php echo $form->textField($model,'status',array('size'=>16,'maxlength'=>16)); ?>
		<?php echo $form->error($model,'status'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'password'); ?>
		<?php echo $form->passwordField($model,'password',array('size'=>32,'maxlength'=>32)); ?>
		<?php echo $form->error($model,'password'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'allowComment'); ?>
		<?php echo $form->checkBox($model,'allowComment'); ?>
		<?php echo $form->error($model,'allowComment'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'allowPing'); ?>
		<?php echo $form->checkBox($model,'allowPing'); ?>
		<?php echo $form->error($model,'allowPing'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'allowFeed'); ?>
		<?php echo $form->checkBox($model,'allowFeed'); ?>
		<?php echo $form->error($model,'allowFeed'); ?>
	</div>
	<div class="row">
		<?php echo $form->labelEx($model,'categorys'); ?>
		<?php echo CHtml::checkBoxList('categorys',$categorys,Metas::items('category')); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'tagsStr'); ?>
		<?php echo $form->textField($model,'tagsStr',array('size'=>60,'maxlength'=>200)); ?>
		<p class="note">用英文逗号 , 分开</p>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->
